import axios from 'axios';
import { req } from './axiosFun';
// const rulApi = 'http://81.71.0.172:30100/api';
const rulApi = 'https://www.xzbky.com/kangyangtrain';
// const gaodemap = 'https://restapi.amap.com/v3/config/district'

/**
 * 企业管理
 **/

// 查询机构人员者的入驻申请列表
export const queryjguserlist = (params) => { return axios.get(rulApi+"/back/queryjguserlist?page=1&limit=10",params)};

// 通过机构人员者的入驻申请
export const regjguserpass = (params) => { return req("post", rulApi+"/back/regjguserpass", params) };

// 驳回机构人员者的入驻申请
export const regjguserfail = (params) => { return req("post", rulApi+"/back/regjguserfail", params) };

// 查询单个或用户的岗位记录
export const querygw = (params) => { return axios.get(rulApi+"/gangwei/querygw?gwiflowid=&usercode="+params.usercode)};

// 查询所有机构提交的岗位
export const querygwlist = (params) => { return req("get", rulApi + "/back/gangwei/querygwlist", params) };

// 后台进行岗位审核 审核状态，0待审核，1审核不通过，2审核通过
export const updategwshstate = (params) => { return req("post", rulApi+"/back/updategwshstate", params) };

// 岗位进行下架处理
export const updategwdown = (params) => { return req("put", rulApi+"/gangwei/updategwdown", params) };


// 创建简历套餐
export const creategwtc = (params) => { return req("post", rulApi+"/gangwei/creategwtc", params) };

// 更新简历套餐
export const updategwtc = (params) => { return req("put", rulApi+"/gangwei/updategwtc", params) };

// 查询岗位套餐
export const querygwtc = (params) => { return axios.get(rulApi + "/gangwei/querygwtc?qwtccode=&qwtcstate=") };

// 创建讲师基础信息
export const createbt = (params) => { return req("post", rulApi+"/back/createbt", params) };

// 查询讲师基础列表
export const querybtlist = (params) => { return axios.get(rulApi + "/back/querybtlist") };

// 更新讲师基础信息
export const updatebt = (params) => { return req("put", rulApi+"/back/updatebt", params) };

// 创建考证信息
export const createkz = (params) => { return req("post", rulApi+"/back/kaozheng/createkz", params) };

// 分页查询考证列表
export const querykzlist = (params) => { return req("get", rulApi+"/back/kaozheng/querykzlist", params) };

// 删除考证
export const deletekz = (params) => { return req("delete", rulApi+"/back/kaozheng/deletekz", params) };

// 发布或者下架考证
export const updatekzstate = (params) => { return req("put", rulApi+"/back/kaozheng/updatekzstate", params) };

// 更新考证
export const updatekz = (params) => { return req("put", rulApi+"/back/kaozheng/updatekz", params) };

// 创新课程基础信息
export const createcb = (params) => { return req("post", rulApi+"/back/createcb", params) };

// 更新课程基础信息
export const updatecb = (params) => { return req("put", rulApi+"/back/updatecb", params) };

// 删除课程基础信息
export const deletecb = (params) => { return req("delete", rulApi+"/back/deletecb", params) };

// 更改课程基础信息发布状态
export const updatecbstate = (params) => { return req("put", rulApi+"/back/updatecbstate", params) };

// 获取课程基础信息列表
export const querycblist = (params) => { return req("get", rulApi+"/back/querycblist", params) };

// 查询讲师基础信息
export const querybt = (params) => { return req("get", rulApi+"/back/querybt", params) };

// 创建题库
export const createbtk = (params) => { return req("post", rulApi+"/back/tiku/createbtk", params) };

// 查询题库列表
export const querybtklist = (params) => { return req("get", rulApi+"/back/tiku/querybtklist", params) };

// 创建题目内容
export const createbtkitems = (params) => { return req("post", rulApi+"/back/tiku/createbtkitems", params) };

// 更新题目内容
export const updatebtkitems = (params) => { return req("put", rulApi+"/back/tiku/updatebtkitems", params) };

// 查询题库具体一道题选项
export const querybtkitems = (params) => { return axios.get(rulApi + "/back/tiku/querybtkitems?btktmcode=") };

// 查询题库具体的
export const querybtkdetail = (params) => { return axios.get(rulApi + "/back/tiku/querybtkdetail?btkcode="+params.btktmcode+"&pageindex="+params.pageindex+"&pagesize="+params.pagesize) };

// 删除题库具体一道题选项
export const deletebtkitems = (params) => { return req("delete", rulApi+"/back/tiku/deletebtkitems", params) };

// 删除题库
export const deletebtk = (params) => { return req("delete", rulApi+"/back/tiku/deletebtk", params) };

// 更新题库
export const updatebtk = (params) => { return req("put", rulApi+"/back/tiku/updatebtk", params) };

//仅保存基础课程的课程表
export const savebckcb = (params) => { return req("post", rulApi+"/back/savebckcb", params) };

//保存基础课程的课程表并发布
export const createbckcb = (params) => { return req("post", rulApi+"/back/createbckcb", params) };

//新增字典配置
export const createdict = (params) => { return req("post", rulApi+"/sys/createdict", params) };

// 根据字典code获取其子项配置,根节点传入’0‘
export const querydict = (params) => { return axios.get(rulApi + "/sys/querydict?dictcode="+params.dictcode) };

// 更新字典配置
export const updatedict = (params) => { return req("put", rulApi+"/sys/updatedict", params) };

//创建直播课程信息
export const createcbzb = (params) => { return req("post", rulApi+"/back/createcbzb", params)};

// 编辑直播课程信息
export const updatecbzb = (params) => { return req("put", rulApi+"/back/updatecbzb", params) };

// 删除直播课程信息
export const deletecbzb = (params) => { return req("delete", rulApi+"/back/deletecbzb", params) };

// 更新直播课程状态信息
export const updatecbzbstate = (params) => { return req("put", rulApi+"/back/updatecbzbstate", params) };

//上传图片资源
export const uploadres = (params) => { return req("post", rulApi+"/res/uploadres", params)};

//上传课件文件
export const fileuploadres = (params) => { return req("post", rulApi+"/common/uploadres", params)};

// 根据字典code获取其子项配置,根节点传入’0‘
export const querycbzblist = (params) => { return axios.get(rulApi + "/back/querycbzblist",params)};

// 获取基础课程的课程表成功
export const querybckcb = (params) => { return axios.get(rulApi + "/back/querybckcb?bccode="+params.bccode) };

//上传课件文件
export const savemnks = (params) => { return req("post", rulApi+"/back/setting/savemnks", params)};

// 获取模拟考试的出题设置
export const querymnks = (params) => { return axios.get(rulApi + "/back/setting/querymnks",params)};

//创建banner
export const createbanner = (params) => { return req("post", rulApi+"/back/banner/createbanner", params)};

//创建banner
export const updatebanner = (params) => { return req("put", rulApi+"/back/banner/updatebanner", params)};


// 获取模拟考试的出题设置
export const querybannerlist = (params) => { return axios.get(rulApi + "/back/banner/querybannerlist",params)};

//删除banner
export const deletebanner = (params) => { return req("delete", rulApi+"/back/banner/deletebanner", params)};

// 创建基础竞赛
export const createbjs = (params) => { return req("post", rulApi+"/back/jingsai/createbjs", params)};

// 根据发布状态获取竞赛列表
export const querybjslist = (params) => { return req("get", rulApi+"/back/jingsai/querybjslist", params)};

//删除基础竞赛
export const deletebjs = (params) => { return req("delete", rulApi+"/back/jingsai/deletebjs", params)};

// 添加竞赛用户
export const createbjsuser = (params) => { return req("post", rulApi+"/back/jingsai/createbjsuser", params)};

// 发布或者下架基础竞赛
export const publishbjs = (params) => { return req("put", rulApi+"/back/jingsai/publishbjs", params)};

// 根据发布状态获取竞赛列表
export const querybjsuserlist = (params) => { return axios.get(rulApi + "/back/jingsai/querybjsuserlist?bjscode="+params.bjscode+"&pageindex="+params.pageindex+"&pagesize="+params.pagesize) };

// 删除竞赛用户
export const deletebjsuser = (params) => { return req("delete", rulApi+"/back/jingsai/deletebjsuser", params)};

// 修改竞赛用户
export const updatebjsuser = (params) => { return req("put", rulApi+"/back/jingsai/updatebjsuser", params)};

// 发布或者下架基础竞赛
export const updatebjs = (params) => { return req("put", rulApi+"/back/jingsai/updatebjs", params)};

// 创建评价机构基础信息
export const createpjjgb = (params) => { return req("post", rulApi+"/jigou/createpjjgb", params)};

// 获取评价机构基础信息列表
export const querypjjgblist = (params) => { return req("get", rulApi+"/jigou/querypjjgblist", params)};

// 导入题库
export const importbtk = (params) => { return req("post", rulApi+"/back/tiku/importbtk", params)};

// 获取在线基础课程学习的学员列表
export const querybcstudyusers = (params) => { return req("get", rulApi+"/back/cource/querybcstudyusers?bccode="+params.bccode)};

// 导入竞赛的参数用户
export const importjsyh = (params) => { return req("post", rulApi+"/back/jingsai/importjsyh", params)};

// 删除讲师基础信息
export const deletebt = (params) => { return req("delete", rulApi+"/back/deletebt", params)};

// 获取用户的所有信息，包括姓名，绑定手机号，职业认证，钱包零钱(元)，积分，已购在线课程，已购名师直播，
//                 考证，培训，题库练习，模拟考，职业竞赛，注册来源，推广员
export const queryallin = (params) => { return req("get", rulApi+"/back/user/queryallin?pageindex="+params.pageindex+"&pagesize="+params.pagesize, params)};

// 获取在线基础课程学习的学员列表
export const querycyuser = (params) => { return req("get", rulApi+"/login/querycyuser?phoneno="+params.phoneno)};

// 获取课程订单记录
export const querybcorder = (params) => { return req("get", rulApi+"/back/order/cource/querybcorder", params)};

// 获取考证订单记录
export const querykzorder = (params) => { return req("get", rulApi+"/back/order/kaozheng/querykzorder", params)};

// 获取考证订单记录
export const queryjsusers = (params) => { return req("get", rulApi+"/back/jingsai/queryjsusers?bjscode="+params.bjscode+"&pageindex="+params.pageindex+"&pagesize="+params.pagesize)};

// 导入竞赛的参数用户
export const createyqmlink = (params) => { return req("post", rulApi+"/wx/createyqmlink", params)};

// 获取考证订单记录
export const querykzbmusers = (params) => { return req("get", rulApi+"/back/kaozheng/querykzbmusers",params)};

// 获取用户详情
export const queryuserinfo = (params) => { return req("get", rulApi+"/login/queryuserinfo?usercode="+params.usercode)};


// 【基础】保存编辑的子分类
// export const saveClassify = (params) => { return req("post", rulApi+"/edit_subitem", params) };
